- name: make the app be real
  hosts: os-masters-stg[0]
  user: root
  gather_facts: False

  vars_files:
    - /srv/web/infra/ansible/vars/global.yml
    - "/srv/private/ansible/vars.yml"
    - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml

  roles:
  - role: openshift/project
    app: librariesio2fedmsg
    description: librariesio2fedmsg
    appowners:
    - jcline
  - role: openshift/secret-file
    app: librariesio2fedmsg
    secret_name: librariesio2fedmsg-fedmsg-key
    key: fedmsg-librariesio2fedmsg.key
    privatefile: fedmsg-certs/keys/librariesio2fedmsg-librariesio2fedmsg.app.os.fedoraproject.org.key
  - role: openshift/secret-file
    app: librariesio2fedmsg
    secret_name: librariesio2fedmsg-fedmsg-crt
    key: fedmsg-librariesio2fedmsg.crt
    privatefile: fedmsg-certs/keys/librariesio2fedmsg-librariesio2fedmsg.app.os.fedoraproject.org.crt
  - { role: openshift/object, vars: {app: librariesio2fedmsg, file: imagestream.yml, objectname: imagestream.yml }}
  - { role: openshift/object, vars: {app: librariesio2fedmsg, file: buildconfig.yml, objectname: buildconfig.yml }}
  - { role: openshift/start-build, vars: {app: librariesio2fedmsg, name: sse2fedmsg-docker-build }}
  - { role: openshift/object, vars: {app: librariesio2fedmsg, template: configmap.yml, objectname: configmap.yml }}
  - { role: openshift/object, vars: {app: librariesio2fedmsg, file: deploymentconfig.yml, objectname: deploymentconfig.yml }}
  - { role: openshift/rollout, vars: {app: librariesio2fedmsg, name: librariesio2fedmsg }}
